// 路由文件
import vueRouter from "vue-router";

//首页
import Home from "../pages/Home"
//书架
import Bookrack from "../pages/Bookrack"
//发现
import Found from "../pages/Found"
//创作
import Creation from "../pages/Creation"
//我的
import Mine from "../pages/Mine"
//书城
import bookTown from "../components/bookTown"



let router = new vueRouter({
    routes:[
        {
            name:'home',
            path:"/home",
            component:Home,
            meta:{
                title:'阅读'
            },
            children:[
                {
                    name:'bookTown',
                    path:"bookTown",//子路由路径 不要写“/”
                    component:bookTown,
                    meta:{
                        title:'书城'
                    }
                }
            ]
        },
        {
            name:'bookrack',
            path:"/bookrack",
            component:Bookrack,
            meta:{
                title:'书架'
            }
        },
        {
            name:'found',
            path:"/found",
            component:Found,
            meta:{
                title:'发现'
            }
        },
        {
            name:'creation',
            path:"/creation",
            component:Creation,
            meta:{
                title:'创作'
            }
        },
        {
            name:'mine',
            path:"/mine",
            component:Mine,
            meta:{
                title:'我的'
            }
        }
    ]
})

export default router